package com.cn.wanxi.service.impl;

import com.cn.wanxi.dao.NewsFindAllDao;
import com.cn.wanxi.dao.ProductFindAllDao;
import com.cn.wanxi.dao.UserDao;
import com.cn.wanxi.dao.impl.NewsFindAllImpl;
import com.cn.wanxi.dao.impl.ProductFindAllImpl;
import com.cn.wanxi.dao.impl.UserImpl;
import com.cn.wanxi.model.NewsModel;
import com.cn.wanxi.model.ProductModel;
import com.cn.wanxi.model.ResultModel;
import com.cn.wanxi.model.UserModel;
import com.cn.wanxi.service.NewsFindAllService;

import java.util.List;

public class NewsFindAllServiceImpl implements NewsFindAllService {
    @Override
    public List<NewsModel> getNewsFindAll(NewsModel newsModel) {
        NewsFindAllDao newsFindAllDao = new NewsFindAllImpl();
        return newsFindAllDao.getNewsFindAll(newsModel);
    }

    @Override
    public List<NewsModel> getNewsInformationById(NewsModel newsModel) {
        NewsFindAllDao newsFindAllDao = new NewsFindAllImpl();
        return newsFindAllDao.getNewsInformationById(newsModel);
    }

    @Override
    public ResultModel findAll(NewsModel newsModel) {
        return null;
    }

    @Override
    public ResultModel add(NewsModel newsModel) {
        return null;
    }

    @Override
    public ResultModel findById(NewsModel newsModel) {
        ResultModel resultModel = new ResultModel();
        NewsFindAllDao newsFindAllDao = new NewsFindAllImpl();
        NewsModel model = newsFindAllDao.findById(newsModel);
        resultModel.setData(model);
        return resultModel;
    }

    @Override
    public ResultModel update(NewsModel newsModel) {
        return null;
    }

    @Override
    public ResultModel delete(NewsModel newsModel) {
        return null;
    }

    @Override
    public ResultModel getCount(NewsModel newsModel) {
        return null;
    }
}
